package com.prj.ufdm.cloud.svr.gateway.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.prj.ufdm.cloud.svr.gateway.config.RedisService;
import com.prj.ufdm.cloud.svr.gateway.util.RestTemplateUtil;

/**
 * 用户管理控制类
 * @author 胡义振  
 * @date 2018年3月26日
 */
@RequestMapping(value = "/web/test")
@Controller
public class TestController {
	
	@Autowired
	RedisService redisService;
	
	@RequestMapping(value = "/t1")
	@ResponseBody
	public String t1(String token) throws Exception	 { 
		redisService.set("3", "test");
		return "t1";
	}
	
	@RequestMapping(value = "/t2")
	@ResponseBody
	public String t2() throws Exception {
		RestTemplateUtil restTmpl = new RestTemplateUtil();
		String reqUrl = "http://192.168.128.129:8090/api/auth/sysuser/doGetList";
		String reqResult = restTmpl.reqPostForm(reqUrl, null, null, null);
		return reqResult;
	}
	

	
}
